Skip to content

feat(engy): add engy sync module - #8715

Merged
rekram1-node merged 1 commit into
anomalyco:devfrom
roykollensvendsen:add-engy-sync
Oct 16, 2026
Merged

rekram1-node merged 1 commit into
anomalyco:devfrom
roykollensvendsen:add-engy-sync

Conversation

@roykollensvendsen

@roykollensvendsen roykollensvendsen commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds a sync module for engy, the provider added in #5910. That PR was split so the provider could land first, and this is the module that was taken out of it. Changes since then came from comparing it with the sync modules merged before it. It now keeps every authored field, as the Mistral module does; before, a fixed field list would have stripped v2's new type field. It also validates prices and leaves a stale input/output split to a human (both below).

engy publishes prices, the context window and modalities on a public GET https://api.engy.ai/v1/models (no auth). The module keeps those current. While #5910 was open it caught two real changes: kimi-k3's 30% price rise on 09-03 and qwen3.8-27b's larger window on 09-13.

What it writes and what it leaves alone

  • Writes the cost (input, output, cache_read), limit.context and modalities.
  • Leaves everything else as authored: the input/output split, reasoning_options, interleaved, any other cost keys, provider, experimental and status. The public list gives only the context window, which on engy is max_input + max_output, so the module never derives the split from it.
  • base_model: an authored base_model wins over the slug resolver.
  • Modalities: an absent, empty or unrecognised list keeps what the file says, and file maps to pdf. A context_length of 0 or less counts as unreported.
  • Stale split: engy's context is max_input + max_output. When context_length no longer equals the authored limit.input + limit.output, the module leaves the file alone and opens a [missing-model] issue (via MissingReasoningOptionsError, as Mistral does for API data that contradicts the file), because the public list can't say which half moved. kimi-k3's window change on 10-02 was exactly this case.
  • Bad rows: a price that isn't a non-negative number fails the run rather than writing a free model. A row with an empty id is ignored; engy serves one as of 10-09.
  • skipCreates: a new id opens a [missing-model] issue instead of a file, because a created file would ship limit.output = 0. Today the list and the catalogue match, so the first run opens nothing.
  • deleteMissing: false: {"data":[]} passes the schema, so retired ids are reported, not deleted.
  • Prices are rounded to six decimals, so the hourly run is a no-op when nothing has changed.

The module is registered in sync/index.ts (alphabetical, direct group), with an engy:sync script and an engy Notes section in sync.md. It is not on REVIEWED_REASONING_PROVIDERS.

Test plan

  • packages/core/test/engy.test.ts: 25 pass, including the fetch path with an injected fetcher (success and 503) and the registration. Reverting each guard one at a time (split check, price validation, empty-id filter, modality fallback, file→pdf, injected fetch, integer context, field list) fails at least one test. The suite reads the shipped engy files and asserts that a sync round trip leaves them unchanged.
  • bun models:sync engy --dry-run, then a real run, then --dry-run again, 2026-10-09 and 2026-10-11: 8 unchanged each time, no files touched; the empty-id row engy served on 10-09 is ignored
  • bun validate
  • bun run test in packages/sdk: 25 pass
  • tsc --noEmit in packages/core: the same 78 errors as on dev, none of them in engy code
  • Based on dev 6633e87

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 3, 2026
@github-actions github-actions Bot removed the reviewer: ready Automated review found no actionable items label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added reviewer: ready Automated review found no actionable items and removed reviewer: ready Automated review found no actionable items labels Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 7, 2026
@roykollensvendsen
roykollensvendsen force-pushed the add-engy-sync branch 2 times, most recently from 2380ea1 to 8aea963 Compare October 9, 2026 09:22
@github-actions github-actions Bot removed the reviewer: ready Automated review found no actionable items label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 9, 2026
@roykollensvendsen roykollensvendsen mentioned this pull request Oct 9, 2026
4 tasks done
engy publishes prices, the context window and modalities on a public
GET /v1/models; the module syncs those and preserves everything else
(the input/output split, reasoning_options, interleaved, the other
cost keys, provider, experimental, status, base_model).

It never creates or deletes: a created file would ship
limit.output = 0, so unseen ids become [missing-model] issues, and the
unauthenticated list can return an empty data array, so missing files
are retained and reported. An authored base_model wins over the slug
resolver. Prices round to six decimals, so the hourly run is a no-op.

A context_length that no longer equals the authored input + output
leaves the file alone and opens a [missing-model] issue, since the
public list cannot say which half moved. A price that is not a
non-negative number fails the run instead of writing a free model,
an empty or unrecognised modality list keeps the authored one, and a
row with an empty id is ignored.

Registered in sync/index.ts and the direct group, with an engy:sync
script, an engy Notes section in sync.md, and 25 tests that read the
shipped files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018k8EL6s5hEtTTMJ8Jjd4Ls
@github-actions github-actions Bot removed the reviewer: ready Automated review found no actionable items label Oct 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 11, 2026
@roykollensvendsen

Copy link
Copy Markdown
Contributor Author

@rekram1-node This one's ready whenever you get to the sync backlog: rebased on today's dev, bot-clean, a no-op against engy's live list. It's the sync half of #5910.

@roykollensvendsen

Copy link
Copy Markdown
Contributor Author

A live example of why this module matters: engy raised max_input_tokens on two models this week, and the catalogue went stale on both (fix in #10089). With this module merged, each would have tripped the context ≠ input + output check. The run would have left the file untouched and opened a [missing-model] issue naming the field to re-read, so the change wouldn't have been silently half-applied.

  • glm-5.3-flash: context_length 262,144 → 327,680 (between 10-11 and 10-13)
  • deepseek-v4.1-flash: context_length 327,680 → 1,048,576 (by 10-16)

@rekram1-node
rekram1-node enabled auto-merge (squash) October 16, 2026 06:11
@rekram1-node
rekram1-node disabled auto-merge October 16, 2026 06:11
@rekram1-node
rekram1-node merged commit c2b06d9 into anomalyco:dev Oct 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants